package com.chen.wow.day03.autowiredmore;

import org.springframework.beans.factory.annotation.Autowired;

public class People {
	private String name;
	private Dessert dessert;
	
	public void play(){
		this.dessert.play();
		System.out.println("people paly...");
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Dessert getDessert() {
		return dessert;
	}
	@Autowired
	//@Qualifier("iceCream")//直接限定bean
	@Cold
	@Fruity
	public void setDessert(Dessert dessert) {
		this.dessert = dessert;
	}
	
	
}
